package org.zoomdev.zoom.web.utils;

public enum MediaType {

    MULTIPART("multipart/form-data"),
    JSON("application/json"),
    STREAM("application/octet-stream"),
    FROM("application/x-www-form-urlencoded");


    private final String type;

    MediaType(String type) {
        this.type = type;
    }


    public String type() {
        return type;
    }

    public boolean is(String type) {
        return type != null && type.startsWith(this.type);
    }
}
